/**
 * 自动生成！请勿修改！
 */
import { command } from '../core/command';

class InfraredTemperatureSensor {
    static categoryCode = '010030014';

    static categoryName = '红外测温传感器';

    device = {};

    opts = {};

    _to = undefined;

    constructor(opt = {}) {
        const { device, to, ...opts } = opt;

        this.device = device;
        this.opts = opts;
        this._to = to;
    }

    get categoryCode() {
        return InfraredTemperatureSensor.categoryCode;
    }

    get categoryName() {
        return InfraredTemperatureSensor.categoryName;
    }

    getAlarmSwitch(params) {
        return command({
            method: 'getAlarmSwitch',
            methodId: 'pGoxHGll',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getAlarmType(params) {
        return command({
            method: 'getAlarmType',
            methodId: 'p1vFjxI5',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getHighTemperatureThreshold(params) {
        return command({
            method: 'getHighTemperatureThreshold',
            methodId: 'phEqKYaw',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getLowTemperatureThreshold(params) {
        return command({
            method: 'getLowTemperatureThreshold',
            methodId: 'ptRS9D6U',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getTemperature(params) {
        return command({
            method: 'getTemperature',
            methodId: 'pDrhFbkm',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    getTemperatureUnit(params) {
        return command({
            method: 'getTemperatureUnit',
            methodId: 'pgh0mqjP',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setAlarmSwitch(params) {
        return command({
            method: 'setAlarmSwitch',
            methodId: 'peH3nf09',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setHighTemperatureThreshold(params) {
        return command({
            method: 'setHighTemperatureThreshold',
            methodId: 'pUPQ8VSM',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setLowTemperatureThreshold(params) {
        return command({
            method: 'setLowTemperatureThreshold',
            methodId: 'pZgRT3CK',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }

    setTemperatureUnit(params) {
        return command({
            method: 'setTemperatureUnit',
            methodId: 'ppAXIOcn',
            params,
            to: this.to?.[this.i] || this.to,
        });
    }
}

export default InfraredTemperatureSensor;
